from google.appengine.ext import db

class Action(db.polymodel.PolyModel):
    # TODO: Add validation routine for these. I think we need to
    # subclass ListProperty and implement a `validate()` method that
    # checks the range.
    #
    # These define the execution schedule for the item.
    years = db.ListProperty(item_type=int)   # Any number of years
    months = db.ListProperty(item_type=int)  # [<1-12>, ...]
    days = db.ListProperty(item_type=int)    # [<1-31>, ...]
    hours = db.ListProperty(item_type=int)   # [<0-23>, ...]
    minutes = db.ListProperty(item_type=int) # [<0-59>, ...]

    def execute(self):
        raise NotImplementedError()
